package com.itheima.entry;

import com.itheima.controller.BaseStudentController;
import com.itheima.controller.OtherStudentController;
import com.itheima.controller.StudentController;
import com.itheima.controller.TeacherController;
import com.itheima.factory.StudentFactory;

import java.util.Scanner;

/*
系统的入口
 */
public class SystemEntry {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        TeacherController teacherController = new TeacherController();
        //死循环
        while (true) {
            System.out.println("--------欢迎来到黑马信息管理系统--------");
            System.out.println("请输入您的选择: 1.学生管理  2.老师管理  3.退出");
            //键盘录入
            String choice = sc.next();

            //选择
            switch (choice) {
                case "1":
                    //System.out.println("进入学生系统");
                    //StudentController studentController = new StudentController();
                 //  OtherStudentController studentController = new OtherStudentController();
                    BaseStudentController studentController = StudentFactory.getStudentController();
                    studentController.start();

                    break;
                case "2":
                    //System.out.println("进入老师系统");

                   teacherController.start();
                    break;
                case "3":
                    System.out.println("再见");
                    //break ;
                    System.exit(1);
                default:
                    System.out.println("输入有误");
                    break;
            }
        }

    }
}
